<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>RestfulLinux: RFDevice.h源文件</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">RestfulLinux
   &#160;<span id="projectnumber">1.0.0</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- 制作者 Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="annotated.html"><span>数据结构</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>全局定义</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">RFDevice.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="RFDevice_8h.html">浏览该文件的文档。</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00012"></a>00012 <span class="preprocessor">#ifndef __RFDEVICE_H__ </span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#define __RFDEVICE_H__</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span>
<a name="l00015"></a>00015 <span class="comment">/*****************************************************************************/</span>
<a name="l00016"></a>00016 <span class="comment">/* Includes                                                                  */</span>
<a name="l00017"></a>00017 <span class="comment">/*****************************************************************************/</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;<a class="code" href="osDataType_8h.html" title="general data type definition .">osAdaption/osDataType.h</a>&gt;</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#ifdef _cplusplus</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span>{
<a name="l00022"></a>00022 <span class="preprocessor">#endif   </span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="comment">/*****************************************************************************/</span>
<a name="l00026"></a>00026 <span class="comment">/* External Definition（Constant and Macro )                                 */</span>
<a name="l00027"></a>00027 <span class="comment">/*****************************************************************************/</span>
<a name="l00029"></a><a class="code" href="RFDevice_8h.html#a31e94f1a75e55e777a9271ad02f0e171">00029</a> <span class="preprocessor">#define DEVICE_NAME_LEN_MAX 15</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a><a class="code" href="RFDevice_8h.html#a9a0595cbc9ab486fdc0dc82edbbe4f5b">00031</a> <span class="preprocessor">#define DEVICE_DESC_LEN_MAX 127</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a><a class="code" href="RFDevice_8h.html#adc7052524e5e4b14dae9691bc70ee162">00033</a> <span class="preprocessor">#define DEVICE_TAGLIST_LEN_MAX 63</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a><a class="code" href="RFDevice_8h.html#a4c3e4596a4079965b008f13658afadd0">00035</a> <span class="preprocessor">#define DEVICE_ID_LEN_MAX   15</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span>
<a name="l00037"></a><a class="code" href="RFDevice_8h.html#a3b20e0198c2eafa93ca5b0c48f6db8a3">00037</a> <span class="preprocessor">#define DEVICE_API_KEY_LEN_MAX 63</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00043"></a><a class="code" href="RFDevice_8h.html#adda3539feb787aaffe0c6fd6871f9e96">00043</a> <span class="preprocessor">#define DEVICEINFO_MASK_TITLE   0x0001</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span>
<a name="l00045"></a><a class="code" href="RFDevice_8h.html#aa27f1c71a41489022953fe8326f39ea8">00045</a> <span class="preprocessor">#define DEVICEINFO_MASK_DESC    0x0002</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span>
<a name="l00047"></a><a class="code" href="RFDevice_8h.html#a816a485e3b0120a6ae402f62a1543bec">00047</a> <span class="preprocessor">#define DEVICEINFO_MASK_PRIVATE 0x0004</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>
<a name="l00049"></a><a class="code" href="RFDevice_8h.html#aea3967420653246266bf5c15ab9f4e9e">00049</a> <span class="preprocessor">#define DEVICEINFO_MASK_TAGLIST 0x0008</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span>
<a name="l00051"></a><a class="code" href="RFDevice_8h.html#a90e50ca5b5a4a84493519eb2cf232678">00051</a> <span class="preprocessor">#define DEVICEINFO_MASK_LOCATION    0x0010</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span>
<a name="l00053"></a><a class="code" href="RFDevice_8h.html#a8effad4c0d9279e504639724fc6739d4">00053</a> <span class="preprocessor">#define DEVICEINFO_MASK_ALL     0xFFFF</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span>
<a name="l00056"></a>00056 <span class="preprocessor">#if 0</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="comment">/* 指定模糊查询设备时使用的参数项*/</span>
<a name="l00058"></a>00058 <span class="preprocessor">#define DEVICEVIEW_MASK_KEYWORD 0x0001</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#define DEVICEVIEW_MASK_TAG     0x0002</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#define DEVICEVIEW_MASK_PRIVATE 0x0004</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#define DEVICEVIEW_MASK_PAGE    0x0008</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#define DEVICEVIEW_MASK_PERPAGE 0x0010</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#define DEVICEVIEW_MASK_DEVICEID    0x0020</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#define DEVICEVIEW_MASK_ALL     0xFFFF</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span>
<a name="l00067"></a>00067 <span class="comment">/*****************************************************************************/</span>
<a name="l00068"></a>00068 <span class="comment">/* External Structures, Enum and Typedefs                                    */</span>
<a name="l00069"></a>00069 <span class="comment">/*****************************************************************************/</span>
<a name="l00073"></a><a class="code" href="structLocationInfo.html">00073</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00074"></a>00074 {
<a name="l00076"></a><a class="code" href="structLocationInfo.html#a11ab0ec19804266cbb6b6e6121980f17">00076</a>     <span class="keywordtype">float</span> <a class="code" href="structLocationInfo.html#a11ab0ec19804266cbb6b6e6121980f17">ele</a>;
<a name="l00078"></a><a class="code" href="structLocationInfo.html#ae55f065c95e023aa6c2514b2b9ad4a22">00078</a>     <span class="keywordtype">float</span> <a class="code" href="structLocationInfo.html#ae55f065c95e023aa6c2514b2b9ad4a22">lat</a>;
<a name="l00080"></a><a class="code" href="structLocationInfo.html#af59ee077fefdb65db12a1543dde1d21f">00080</a>     <span class="keywordtype">float</span> <a class="code" href="structLocationInfo.html#af59ee077fefdb65db12a1543dde1d21f">lon</a>;
<a name="l00081"></a>00081 } <a class="code" href="structLocationInfo.html" title="位置信息定义">LocationInfo</a>, *<a class="code" href="structLocationInfo.html" title="位置信息定义">pLocationInfo</a>;
<a name="l00082"></a>00082 
<a name="l00086"></a><a class="code" href="structRFDeviceConfig.html">00086</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00087"></a>00087 {
<a name="l00089"></a><a class="code" href="structRFDeviceConfig.html#ab8ab5c9dd84e9ef083e93db71e3f607a">00089</a>     int8 deviceTitle[<a class="code" href="RFDevice_8h.html#a31e94f1a75e55e777a9271ad02f0e171">DEVICE_NAME_LEN_MAX</a> + 1];
<a name="l00091"></a><a class="code" href="structRFDeviceConfig.html#a1cb83e7fa72ee2aaa8ed321a0465a2d3">00091</a>     int8 deviceDesc[<a class="code" href="RFDevice_8h.html#a9a0595cbc9ab486fdc0dc82edbbe4f5b">DEVICE_DESC_LEN_MAX</a> + 1];
<a name="l00093"></a><a class="code" href="structRFDeviceConfig.html#ad73575801d670326a8730303b73de368">00093</a>     int8 deviceTagList[<a class="code" href="RFDevice_8h.html#adc7052524e5e4b14dae9691bc70ee162">DEVICE_TAGLIST_LEN_MAX</a> + 1];
<a name="l00095"></a><a class="code" href="structRFDeviceConfig.html#aa8ee67e2247ea1976c1403b022311e31">00095</a>     int8 APIKey[<a class="code" href="RFDevice_8h.html#a3b20e0198c2eafa93ca5b0c48f6db8a3">DEVICE_API_KEY_LEN_MAX</a> + 1];
<a name="l00097"></a><a class="code" href="structRFDeviceConfig.html#a65d98624e4939fb4c67140ed9d2d3927">00097</a>     <a class="code" href="structLocationInfo.html" title="位置信息定义">LocationInfo</a> <a class="code" href="structRFDeviceConfig.html#a65d98624e4939fb4c67140ed9d2d3927">locInfo</a>;
<a name="l00099"></a><a class="code" href="structRFDeviceConfig.html#a06ca83c377cc558bf0a25853bfe9d398">00099</a>     boolValue <a class="code" href="structRFDeviceConfig.html#a06ca83c377cc558bf0a25853bfe9d398">isPrivate</a>;
<a name="l00100"></a>00100 } <a class="code" href="structRFDeviceConfig.html" title="设备配置信息定义">RFDeviceConfig</a>, *<a class="code" href="structRFDeviceConfig.html" title="设备配置信息定义">pRFDeviceConfig</a>;
<a name="l00101"></a>00101 
<a name="l00105"></a><a class="code" href="structRFDeviceInfo.html">00105</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00106"></a>00106 {
<a name="l00108"></a><a class="code" href="structRFDeviceInfo.html#aadac3f4f69381d631ec099c556bf7ba7">00108</a>     <a class="code" href="structRFDeviceConfig.html" title="设备配置信息定义">RFDeviceConfig</a> <a class="code" href="structRFDeviceInfo.html#aadac3f4f69381d631ec099c556bf7ba7">devConfig</a>;
<a name="l00110"></a><a class="code" href="structRFDeviceInfo.html#a20f5f7b1e97c312c0b50b36571b87689">00110</a>     int8 deviceID[<a class="code" href="RFDevice_8h.html#a4c3e4596a4079965b008f13658afadd0">DEVICE_ID_LEN_MAX</a> + 1];
<a name="l00112"></a><a class="code" href="structRFDeviceInfo.html#a5483620c5bc35ffd217c88da775d03fc">00112</a>     uint32 <a class="code" href="structRFDeviceInfo.html#a5483620c5bc35ffd217c88da775d03fc">createTime</a>;
<a name="l00113"></a>00113 } <a class="code" href="structRFDeviceInfo.html" title="设备属性定义">RFDeviceInfo</a>, *<a class="code" href="structRFDeviceInfo.html" title="设备属性定义">pRFDeviceInfo</a>;
<a name="l00114"></a>00114 
<a name="l00115"></a>00115 <span class="preprocessor">#include &lt;<a class="code" href="RFDeviceDetails_8h.html" title="设备明细结构定义">RFDeviceDetails.h</a>&gt;</span>
<a name="l00116"></a>00116 
<a name="l00117"></a>00117 <span class="comment">/*****************************************************************************/</span>
<a name="l00118"></a>00118 <span class="comment">/* External Function Prototypes                                              */</span>
<a name="l00119"></a>00119 <span class="comment">/*****************************************************************************/</span>
<a name="l00120"></a>00120 
<a name="l00131"></a>00131 int32 <a class="code" href="RFDevice_8h.html#a02926dbce65bd9880b03be1af5cbfa77" title="新增设备。设备创建成功后，用户应保存返回的设备ID，当下一次上线时， 无需重新调用设备创建接口，直接使用RFDevice_Init 即可。 本接口包含RFDevice_Init 的功能。...">RFDevice_Create</a>(<a class="code" href="structRFDeviceConfig.html" title="设备配置信息定义">RFDeviceConfig</a> *devConfig, int8 *deviceID);
<a name="l00132"></a>00132 
<a name="l00142"></a>00142 int32 <a class="code" href="RFDevice_8h.html#a8c09fa856caf5347b63dafbf9ed1df4a" title="设备信息初始化，和RFDevice_Create 接口只需调用其中一个。需要向云端 添加设备时用Create接口，其它情况用Init接口">RFDevice_Init</a>(int8 *deviceID, int8 *masterKey);
<a name="l00143"></a>00143 
<a name="l00153"></a>00153 int32 <a class="code" href="RFDevice_8h.html#a2adeb6c8fdf317ce85ac17a6a4cfa681" title="更新设备信息">RFDevice_UpdateInfo</a>(<a class="code" href="structRFDeviceConfig.html" title="设备配置信息定义">RFDeviceConfig</a> *devConfig, uint32 updateFlag);
<a name="l00154"></a>00154 
<a name="l00155"></a>00155 
<a name="l00164"></a>00164 int32 <a class="code" href="RFDevice_8h.html#aa827474024c22d75e07df176c60acc07" title="查询设备，只限查询本设备">RFDevice_View</a>(int8 *APIKey, <a class="code" href="structRFDeviceDetails.html" title="设备详细信息结构定义">RFDeviceDetails</a> *details);
<a name="l00165"></a>00165 
<a name="l00171"></a>00171 <span class="keywordtype">void</span> <a class="code" href="RFDevice_8h.html#ac52c59eec134c6877e8dde7b1b18ac02" title="执行RFDevice_View 操作后，必须调用该接口释放空间">RFDevice_FreeDetails</a>(<a class="code" href="structRFDeviceDetails.html" title="设备详细信息结构定义">RFDeviceDetails</a> *details);
<a name="l00172"></a>00172 
<a name="l00180"></a>00180 int32 <a class="code" href="RFDevice_8h.html#afefa76d28d4681972e9c99333b0bbf8e" title="从云端删除指定设备">RFDevice_Delete</a>(int8 *APIKey);
<a name="l00181"></a>00181 
<a name="l00182"></a>00182 <span class="preprocessor">#ifdef _cplusplus</span>
<a name="l00183"></a>00183 <span class="preprocessor"></span>}
<a name="l00184"></a>00184 <span class="preprocessor">#endif   </span>
<a name="l00185"></a>00185 <span class="preprocessor"></span>
<a name="l00186"></a>00186 <span class="preprocessor">#endif</span>
<a name="l00187"></a>00187 <span class="preprocessor"></span>
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>数据结构</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>枚举</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>枚举值</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated at 2016年六月3日 星期五 09:08:32 for RestfulLinux by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
